<?php
/**
 * 
 *  Same result of curl/login2.php, this program use pear's HTTP_Request.
 */
require_once "HTTP/Request.php";	
$r = new HTTP_Request('http://localhost/phpapps/phpstudy/apache_pwd_control/readme.html');
$r->setBasicAuth('user1','pass1');
$r->sendRequest();
$page = $r->getResponseBody(); 
print $page;
?>

